| # Arbitrary-Precision Math | Documentation Contents

> The `java.math` package supports arbitrary-precision math. The package consists of two classes:
> - `BigInteger` numbers are immutable, arbitrary-precision integers. The `BigInteger` class provides analogs for all Java language primitive integer operators. The class also supports modular arithmetic, GCD calculation, prime number generation and testing, single-bit manipulation, and various other operations.
> - `BigDecimal` numbers are immutable, arbitrary-precision signed decimal numbers, suitable for monetary calculations. The `BigDecimal` class provides operations for basic arithmetic, scale manipulation, comparison, format conversion, and hashing.

Enhancements

- Enhancements to `java.math` in version 1.4 of the JavaTM 2 SDK.
- Enhancements to `java.math` in version 1.3 of the Java 2 SDK.

API Specification

- java.math Package

Copyright © 2002 Sun Microsystems, Inc. All Rights Reserved. Please send comments to: j2se-comments@sun.com | Java Software